package com.hyh.redis.config;

import com.hyh.redis.helper.RedisDistributionLockHelper;
import com.hyh.redis.helper.RedisHelper;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Redis AutoConfiguration
 *
 * @Author: heyuhua
 * @Date: 2021/1/28 16:02
 */
@ConditionalOnWebApplication
@Configuration(proxyBeanMethods = false)
@ComponentScan("com.hyh.redis.config")
public class HyhRedisAutoConfiguration {

    @Bean
    public RedisHelper redisHelper() {
        return new RedisHelper();
    }

    @Bean
    public RedisDistributionLockHelper redisDistributionLockHelper() {
        return new RedisDistributionLockHelper();
    }

}
